/*******************************************************************************

ATTENTION, this is an altered version of the xhtml_gen library, specifically tailored to libwebconf's needs please refer to the original library

xhtml_gen: xhtml generation library.
Copyright (c) 2006  Mitchel Haas

This software is provided 'as-is', without any express or implied warranty. 
In no event will the author be held liable for any damages arising from 
the use of this software.

Permission is granted to anyone to use this software for any purpose, 
including commercial applications, and to alter it and redistribute it freely, 
subject to the following restrictions:

1.	The origin of this software must not be misrepresented; 
you must not claim that you wrote the original software. 
If you use this software in a product, an acknowledgment in the product 
documentation would be appreciated but is not required.

2.	Altered source versions must be plainly marked as such, 
and must not be misrepresented as being the original software.

3.	The above copyright notice and this permission notice may not be removed 
or altered from any source distribution.

For complete documentation on this library, see http://www.datasoftsolutions.net
Email questions, comments or suggestions to mhaas@datasoftsolutions.net
*******************************************************************************/
#include "tag_trait_manager.hpp"


namespace xhtml_gen
{
	const attribute a_attributes[] =  
	{ accesskey, charset, class_attr, coords, dir_attr, href, hreflang, id, 
	lang, name, onblur, onclick, ondblclick, onfocus, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, rel, rev, shape, style_attr, tabindex, target, title_attr, 
	type, xmllang
	};

	const attribute abbr_attributes[] = // 1
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute acronym_attributes[] = 
	{class_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, 
	onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute address_attributes[] =
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute applet_attributes[] = 
	{align, alt, archive, class_attr, code_attr, codebase, height, hspace, id, 
	name, object_attr, style_attr, title_attr, vspace, width};

	const attribute area_attributes[] = // 5
	{accesskey, alt, class_attr, coords, dir_attr, href, id, lang, hohref, 
	onblur, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, 
	onmousedown, onmousemove, onmouseout, onmouseover, onmouseup,
	shape, style_attr, tabindex, target, title_attr, xmllang};

	const attribute b_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute base_attributes[] = {href, target}; 

	const attribute basefont_attributes[] = {color, face, id, size};  

	const attribute bdo_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute big_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute blockquote_attributes[] = 
	{cite_attr, class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute body_attributes[] =
	{alink, background, bgcolor, class_attr, dir_attr, id, lang, link_attr, 
	onclick, ondblclick, onkeydown, onkeypress, onkeyup, onload, onmousedown,
	onmousemove, onmouseout, onmouseover, onmouseup, onunload, style_attr, 
	text, title_attr, vlink, xmllang};

	const attribute br_attributes[] = 
	{class_attr, clear, id, style_attr, title_attr}; 

	const attribute button_attributes[] = 
	{accesskey, class_attr, dir_attr, disabled, 
	id, lang, name, onblur, onclick, ondblclick, onfocus, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, tabindex, title_attr, type, value, xmllang};

	const attribute caption_attributes[] = 
	{class_attr, class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute center_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup,
	style_attr, title_attr, xmllang};

	const attribute cite_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute code_attributes[] = // 18
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute col_attributes[] = 
	{align, char_attr, charoff, class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onmousemove, onmouseout, onmouseover, 
	onmouseup, span_attr, style_attr, title_attr, valign, width, xmllang};

	const attribute colgroup_attributes[] = 
	{align, char_attr, charoff, class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, span_attr, style_attr, title_attr, 
	valign, width, xmllang};

	const attribute dd_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute del_attributes[] = 
	{cite_attr, class_attr, datetime, dir_attr, id, lang, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute dfn_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute dir_attributes[] = 
	{class_attr, compact, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute div_attributes[] = 
	{align, class_attr, dir_attr, id, lang, 
	onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute dl_attributes[] = 
	{class_attr, compact, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout,
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute dt_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout,
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute em_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout,
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute fieldset_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute font_attributes[] = 
	{class_attr, color, dir_attr, face, id, lang, size, style_attr, 
	title_attr, xmllang};

	const attribute form_attributes[] = 
	{accept, accept_charset, action, class_attr, dir_attr, enctype, id, lang, 
	method, name, onclick, ondblclick, onkeydown, onkeypress,
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	onreset, onsubmit, style_attr, target, title_attr, xmllang};

	const attribute frame_attributes[] = 
	{class_attr, frameborder, id, longdesc, marginheight, marginwidth, name, 
	noresize, scrolling, src, style_attr, title_attr};

	const attribute frameset_attributes[] = 
	{class_attr, cols, id, onload, onunload, rows, style_attr, title_attr};

	const attribute h_attributes[] = 
	{align, class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover,
	onmouseup, style_attr, title_attr, xmllang};

	const attribute head_attributes[] = 
	{dir_attr, lang, profile, xmllang};

	const attribute hr_attributes[] = 
	{align, class_attr, dir_attr, id, lang, noshade, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, size, style_attr, title_attr, width, xmllang};

	const attribute html_attributes[] = 
	{dir_attr, lang, xmllang, xmlns};

	const attribute i_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup,
	style_attr, title_attr, xmllang};

	const attribute iframe_attributes[] = 
	{align, class_attr, frameborder, height, id, longdesc, marginheight, 
	marginwidth, name, scrolling,  src, style_attr, title_attr, width};

	const attribute img_attributes[] = 
	{align, alt, border, class_attr, dir_attr, height, hspace, id, ismap, lang, 
	longdesc, name, onclick, ondblclick, onkeydown, onkeypress,
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	src, style_attr, title_attr, usemap, vspace, width, xmllang};

	const attribute input_attributes[] = 
	{accept, accesskey, align, alt, checked, class_attr, 
	dir_attr, disabled, id, ismap, lang, maxlength, name,
	onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	onselect, readonly, size, src, style_attr, tabindex, title_attr, type, 
	usemap, value, xmllang};

	const attribute ins_attributes[] = 
	{cite_attr, class_attr, datetime, dir_attr, id, lang, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute isindex_attributes[] = 
	{class_attr, dir_attr, id, lang, prompt, style_attr, title_attr, xmllang};

	const attribute kbd_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute label_attributes[] = 
	{accesskey, class_attr, dir_attr, for_attr, id, lang, onblur, onclick, 
	ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, 
	onmousemove, onmouseout, onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute legend_attributes[] = 
	{accesskey, align, class_attr, dir_attr, id, lang, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute li_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, type, value, xmllang};

	const attribute link_attributes[] = 
	{charset, class_attr, dir_attr, href, hreflang, id, lang, media, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, rel, rev, style_attr, target, 
	title_attr, type, xmllang};

	const attribute map_attributes[] =
	{class_attr, dir_attr, id, lang, name, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute menu_attributes[] = 
	{class_attr, compact, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute meta_attributes[] = 
	{content_attr, dir_attr, http_equiv, lang, name, scheme, xmllang};

	const attribute noframes_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute noscript_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute object_attributes[] = 
	{align, archive, border, class_attr, classid, codebase, codetype, data, 
	declare, dir_attr, height, hspace, id, 
	lang, name, onclick, ondblclick, onkeydown, onkeypress, onkeyup, 
	onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, standby, 
	style_attr, tabindex, title_attr, type, usemap, vspace, width, xmllang};

	const attribute ol_attributes[] = 
	{class_attr, compact, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, start, style_attr, title_attr, type, xmllang};

	const attribute optgroup_attributes[] = 
	{class_attr, dir_attr, disabled, id, label_attr, lang, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout,
	onmouseover, onmouseup, selected, style_attr, title_attr, value, xmllang};

	const attribute option_attributes[] = 
	{class_attr, dir_attr, disabled, id, label_attr, lang, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, selected, style_attr, title_attr, value, xmllang};

	const attribute p_attributes[] = 
	{align, class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute param_attributes[] = 
	{id, name, type, value, valuetype};

	const attribute pre_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, width, xmllang, xmlspace};

	const attribute q_attributes[] = 
	{cite_attr, class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute s_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute samp_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute script_attributes[] = 
	{charset, for_attr, language, src, type, xmlspace};

	const attribute select_attributes[] = 
	{class_attr, datafld, dataformatas, datasrc, dir_attr, disabled, id, lang, 
	multiple, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, size, style_attr, tabindex, title_attr, xmllang};

	const attribute small_attrubutes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute span_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute strike_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute strong_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute style_attributes[] = 
	{dir_attr, lang, media, title_attr, type, xmllang, xmlspace};

	const attribute sub_attributes[] =
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute sup_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};

	const attribute table_attributes[] = 
	{align, bgcolor, border, cellpadding, cellspacing, class_attr, 
	dir_attr, frame_attr, id, lang, 
	onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, 
	onmousemove, onmouseout, onmouseover, onmouseup, rules, style_attr, 
	summary, title_attr, width, xmllang};

	const attribute tbody_attributes[] = 
	{align, char_attr, charoff, class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, valign, 
	xmllang};

	const attribute td_attributes[] = 
	{abbr_attr, align, axis, bgcolor, char_attr, charoff, class_attr, colspan, 
	dir_attr, headers, height, id, lang, nowrap, onclick, ondblclick,
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, rowspan, scope, style_attr, 
	title_attr, valign, width, xmllang};

	const attribute textarea_attributes[] = 
	{accesskey, class_attr, cols, dir_attr, 
	disabled, id, lang, name, onblur, onchange, onclick, ondblclick, 
	onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup,	onselect, readonly, rows, 
	style_attr, tabindex, title_attr, xmllang};

	const attribute tfoot_attributes[] = 
	{align, char_attr, charoff, class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, valign, xmllang};

	const attribute th_attributes[] = 
	{abbr_attr, align, axis, bgcolor, char_attr, charoff, class_attr, colspan, 
	dir_attr, headers, height, id, lang, nowrap, onclick, ondblclick, 
	onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, rowspan, scope, style_attr, title_attr, valign, 
	width, xmllang};

	const attribute thead_attributes[] = 
	{align, char_attr, charoff, class_attr, dir_attr, id, lang, onclick, 
	ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, 
	onmouseout, onmouseover, onmouseup, style_attr, title_attr, valign, xmllang};

	const attribute title_attributes[] = 
	{dir_attr, lang, xmllang};

	const attribute tr_attributes[] = 
	{align, bgcolor, char_attr, charoff, class_attr, dir_attr, id, lang, 
	onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, 
	onmousemove, onmouseout, onmouseover, onmouseup, style_attr, title_attr, 
	valign, xmllang};

	const attribute tt_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, onkeypress, 
	onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, 
	style_attr, title_attr, xmllang};

	const attribute u_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, xmllang};

	const attribute ul_attributes[] = 
	{class_attr, compact, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, 
	onmouseup, style_attr, title_attr, type, xmllang};

	const attribute var_attributes[] = 
	{class_attr, dir_attr, id, lang, onclick, ondblclick, onkeydown, 
	onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, 
	onmouseover, onmouseup, style_attr, title_attr, xmllang};




std::set<attribute> tag_trait_manager::populate_attribs(const attribute* const pAttr, const int count)
{
	std::set<attribute> attrSet;
	for (int i = 0; i < count; ++i)
		attrSet.insert(pAttr[i]);

	return attrSet;
}

std::set<xhtml_strict> tag_trait_manager::populate_nested_tags(const xhtml_strict* const pTags, const int count)
{
	std::set<xhtml_strict> tags;
	for (int i = 0; i < count; ++i)
		tags.insert(pTags[i]);

	return tags;
}


tag_trait_manager::tag_trait_manager()
{
	create_a();

	create_abbr();
	create_acronym();
	create_address();
	create_applet();
	create_area();
	create_b();
	create_base();
	create_basefont();
	create_bdo();
	create_big();
	create_blockquote();
	create_body();
	create_br();
	create_button();
	create_caption();
	create_center();
	create_cite();
	create_code();
	create_col();
	create_colgroup();
	create_dd();
	create_del();
	create_dfn();
	create_dir();
	create_div();
	create_dl();
	create_dt();
	create_em();
	create_fieldset();
	create_font();
	create_form();
	create_frame();
	create_frameset();
	create_h1();
	create_h2();
	create_h3();
	create_h4();
	create_h5();
	create_h6();
	create_head();
	create_hr();
	create_html();
	create_i();
	create_iframe();
	create_img();
	create_input();
	create_ins();
	create_isindex();
	create_kbd();
	create_label();
	create_legend();
	create_li();
	create_link();
	create_map();
	create_menu();
	create_meta();
	create_noframes();
	create_noscript();
	create_object();
	create_ol();
	create_optgroup();
	create_option();
	create_p();
	create_param();
	create_pre();
	create_q();
	create_s();
	create_samp();
	create_script();
	create_select();
	create_small();
	create_span();
	create_strike();
	create_strong();
	create_style();
	create_sub();
	create_sup();
	create_table();
	create_tbody();
	create_td();
	create_textarea();
	create_tfoot();
	create_th();
	create_thead();
	create_title();
	create_tr();
	create_tt();
	create_u();
	create_ul();
	create_var();
}

tag_trait_manager::~tag_trait_manager()
{
	std::vector<tag_trait*>::iterator it = tag_trait_vec.begin();
	for ( ; it != tag_trait_vec.end(); ++it ) {
		delete *it;
	}
}

const tag_trait* tag_trait_manager::get_tag_trait(xhtml_strict _tag) const
{
	return tag_trait_vec[_tag]; 
}



/*************************************  a  ************************************/
inline void tag_trait_manager::create_a()
{
	const xhtml_gen::xhtml_strict nested_exception[] = {xhtml_gen::a, xhtml_gen::p };


	tag_trait_vec.push_back(
		new tag_trait(	a,			
								"a",			
								in_line,	
								in_line,		
								populate_attribs(a_attributes, 31),			
								std::set<xhtml_strict>(),
								populate_nested_tags(nested_exception, 2)));

	attribute attribs[] = { target };

	tag_trait_vec[a]->remove_attributes(attribs, 1);
}

/*************************************  abbr  *********************************/
inline void tag_trait_manager::create_abbr()
{
	tag_trait_vec.push_back(
		new tag_trait(	abbr,			
								"abbr",			
								in_line,	
								in_line,		
								populate_attribs(abbr_attributes, 17),	
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  acronym  ******************************/
inline void tag_trait_manager::create_acronym()
{
	tag_trait_vec.push_back(
		new tag_trait(	acronym,		
								"acronym",		
								in_line,	
								in_line,		
								populate_attribs(acronym_attributes, 16),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  address  ******************************/
inline void tag_trait_manager::create_address()
{
	const xhtml_strict nested_tags[] = {p};

	tag_trait_vec.push_back(
		new tag_trait(	address,		
								"address",		
								block,		
								in_line,		
								populate_attribs(address_attributes, 17),		
								populate_nested_tags(nested_tags, 1),		
								std::set<xhtml_strict>()));

}

/*************************************  applet  *******************************/
inline void tag_trait_manager::create_applet()
{
	// applet not available in strict tag_type
}

/*************************************  area  *********************************/
inline void tag_trait_manager::create_area()
{
	tag_trait_vec.push_back(
		new tag_trait(	area,			
								"area",		
								non_flow,	
								empty,			
								populate_attribs(area_attributes, 27),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	attribute attribs[] = { target };
	tag_trait_vec[area]->remove_attributes(attribs, 1);

}

/*************************************  b  ************************************/
inline void tag_trait_manager::create_b()
{
	tag_trait_vec.push_back(
		new tag_trait(	b,
								"b",			
								in_line,	
								in_line,		
								populate_attribs(b_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	attribute attribs[] = { target };
	tag_trait_vec[b]->remove_attributes(attribs, 1);

}

/*************************************  base  *********************************/
inline void tag_trait_manager::create_base()
{
	tag_trait_vec.push_back(
		new tag_trait(	base,			
								"base",			
								non_flow,	
								empty,			
								populate_attribs(base_attributes, 2),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	attribute attribs[] = { target };
	tag_trait_vec[base]->remove_attributes(attribs, 1);

}

/*************************************  basefont  *****************************/
inline void tag_trait_manager::create_basefont()
{
	// basefont not available in strict tag_type
}

/*************************************  bdo  **********************************/
inline void tag_trait_manager::create_bdo()
{
	tag_trait_vec.push_back(
		new tag_trait(	bdo,			
								"bdo",			
								in_line,	
								in_line,		
								populate_attribs(bdo_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  big  **********************************/
inline void tag_trait_manager::create_big()
{
	tag_trait_vec.push_back(
		new tag_trait(	big,			
								"big",			
								in_line,	
								in_line,		
								populate_attribs(big_attributes, 17),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  blockquote  ***************************/
inline void tag_trait_manager::create_blockquote()
{
	tag_trait_vec.push_back(
		new tag_trait(	blockquote,	
								"blockquote",	
								block,		
								block,			
								populate_attribs(blockquote_attributes, 18),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	tag_trait_vec[blockquote]->add_allowed_nested_tag(script);

}

/*************************************  body  *********************************/
inline void tag_trait_manager::create_body()
{
	const xhtml_strict body_nested_tags[] = {ins, del};

	tag_trait_vec.push_back(
		new tag_trait(	body,			
								"body",			
								non_flow,	
								block,			
								populate_attribs(body_attributes, 25),		
								populate_nested_tags(body_nested_tags, 2),						
								std::set<xhtml_strict>()));

	attribute attrib_removal[] =
		{ alink, background, bgcolor, link_attr, text, vlink };

	tag_trait_vec[body]->add_allowed_nested_tag(script);
	tag_trait_vec[body]->remove_attributes(attrib_removal, 6);
}

/*************************************  br  ***********************************/
inline void tag_trait_manager::create_br()
{
	tag_trait_vec.push_back(
		new tag_trait(	br,			
								"br",			
								in_line,	
								empty,			
								populate_attribs(br_attributes, 5),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	attribute attribs[] = { clear };

	tag_trait_vec[br]->remove_attributes(attribs, 1);

}

/*************************************  button  *******************************/
inline void tag_trait_manager::create_button()
{
	const xhtml_strict nested_exceptions[] = 
	{a, input, select, textarea, label, button, form, fieldset};


	tag_trait_vec.push_back(
		new tag_trait(	button,		
								"button",		
								in_line,	
								flow,			
								populate_attribs(button_attributes, 25),	
								std::set<xhtml_strict>(),						
								populate_nested_tags(nested_exceptions, 8)));

}

/*************************************  caption  ******************************/
inline void tag_trait_manager::create_caption()
{
	tag_trait_vec.push_back(
		new tag_trait(	caption,
								"caption",
								non_flow,
								in_line,
								populate_attribs(caption_attributes, 18),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));
	
	const attribute attribs[] = { align };
	tag_trait_vec[caption]->remove_attributes(attribs, 1);
}

/*************************************  center  *******************************/
inline void tag_trait_manager::create_center()
{
	// center not available for strict tag_type
}

/*************************************  cite  *********************************/
inline void tag_trait_manager::create_cite()
{
	tag_trait_vec.push_back(
		new tag_trait(	cite,			
								"cite",			
								in_line,	
								in_line,		
								populate_attribs(cite_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  code  *********************************/
inline void tag_trait_manager::create_code()
{
	tag_trait_vec.push_back(
		new tag_trait(	code,			
								"code",			
								in_line,	
								in_line,		
								populate_attribs(code_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  col  **********************************/
inline void tag_trait_manager::create_col()
{
	tag_trait_vec.push_back(
		new tag_trait(	col,
								"col",
								non_flow,
								empty,
								populate_attribs(col_attributes, 20),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

}

/*************************************  colgroup  *****************************/
inline void tag_trait_manager::create_colgroup()
{
	const xhtml_strict colgroup_nested_tags[] = {col};

	tag_trait_vec.push_back(
		new tag_trait(	colgroup,
								"colgroup",
								non_flow, 
								non_flow,
								populate_attribs(colgroup_attributes, 23),
								populate_nested_tags(colgroup_nested_tags, 1),
								std::set<xhtml_strict>()));

}

/*************************************  dd  ***********************************/
inline void tag_trait_manager::create_dd()
{
	tag_trait_vec.push_back(
		new tag_trait(	dd,			
						"dd",			
						non_flow,	
						flow,			
						populate_attribs(dd_attributes,	17),		
						std::set<xhtml_strict>(),						
						std::set<xhtml_strict>()));

}

/*************************************  del  **********************************/
inline void tag_trait_manager::create_del()
{
	tag_trait_vec.push_back(
		new tag_trait(	del,
								"del",
								non_flow,
								flow,
								populate_attribs(del_attributes, 19),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));
}

/*************************************  dfn  **********************************/
inline void tag_trait_manager::create_dfn()
{
	tag_trait_vec.push_back(
		new tag_trait(	dfn,			
								"dfn",			
								in_line,	
								in_line,		
								populate_attribs(dfn_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  dir  **********************************/
inline void tag_trait_manager::create_dir()
{
	// dir not availible in strict doctypes
}

/*************************************  div  **********************************/
inline void tag_trait_manager::create_div()
{
	tag_trait_vec.push_back(
		new tag_trait(	xhtml_gen::div,
								"div",			
								block,		
								flow,			
								populate_attribs(div_attributes, 18),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[xhtml_gen::div]->remove_attributes(attribs, 1);

}

/*************************************  dl  ***********************************/
inline void tag_trait_manager::create_dl()
{
	const xhtml_strict dl_nested_tags[] = {dt, dd};

	tag_trait_vec.push_back(
		new tag_trait(	dl,			
								"dl",			
								block,		
								non_flow,		
								populate_attribs(dl_attributes, 18),
								populate_nested_tags(dl_nested_tags, 2),				
								std::set<xhtml_strict>()));

	const attribute attribs[] = { compact };
	tag_trait_vec[dl]->remove_attributes(attribs, 1);
}

/*************************************  dt  ***********************************/
inline void tag_trait_manager::create_dt()
{
	tag_trait_vec.push_back(
		new tag_trait(	dt,			
								"dt",			
								non_flow,	
								in_line,		
								populate_attribs(dt_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  em  ***********************************/
inline void tag_trait_manager::create_em()
{
	tag_trait_vec.push_back(
		new tag_trait(	em,			
								"em",			
								in_line,	
								in_line,		
								populate_attribs(em_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  fieldset  *****************************/
inline void tag_trait_manager::create_fieldset()
{
	const xhtml_strict fieldset_nested_tags[] = {legend};

	tag_trait_vec.push_back(
		new tag_trait(	fieldset,		
								"fieldset",		
								block,		
								flow,			
								populate_attribs(fieldset_attributes, 17),	
								populate_nested_tags(fieldset_nested_tags, 1),						
								std::set<xhtml_strict>()));

}

/*************************************  font  *********************************/
inline void tag_trait_manager::create_font()
{
	// font not available for strict tag_type
}

/*************************************  form  *********************************/
inline void tag_trait_manager::create_form()
{
	const xhtml_strict form_nested_exceptions[] = {form};

	tag_trait_vec.push_back(
		new tag_trait(	form,			
								"form",			
								block,		
								flow,			
								populate_attribs(form_attributes, 26),		
								std::set<xhtml_strict>(),						
								populate_nested_tags(form_nested_exceptions, 1)));

	const attribute attribs[] = { name };
	tag_trait_vec[form]->remove_attributes(attribs, 1);

}

/*************************************  frame  ********************************/
inline void tag_trait_manager::create_frame()
{
	// frame not available for strict tag_type
}

/*************************************  xhtml_gen::xhtml_frameset  *****************************/
inline void tag_trait_manager::create_frameset()
{
	// xhtml_gen::xhtml_frameset not available for strict tag_type
}

/*************************************  h1  ***********************************/
inline void tag_trait_manager::create_h1()
{
	tag_trait_vec.push_back(
		new tag_trait(	h1,			
								"h1",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h1]->remove_attributes(attribs, 1);
}

/*************************************  h2  ***********************************/
inline void tag_trait_manager::create_h2()
{
	tag_trait_vec.push_back(
		new tag_trait(	h2,			
								"h2",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h2]->remove_attributes(attribs, 1);
}

/*************************************  h3  ***********************************/
inline void tag_trait_manager::create_h3()
{
	tag_trait_vec.push_back(
		new tag_trait(	h3,			
								"h3",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h3]->remove_attributes(attribs, 1);
}

/*************************************  h4  ***********************************/
inline void tag_trait_manager::create_h4()
{
	tag_trait_vec.push_back(
		new tag_trait(	h4,			
								"h4",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h4]->remove_attributes(attribs, 1);
}

/*************************************  h5  ***********************************/
inline void tag_trait_manager::create_h5()
{
	tag_trait_vec.push_back(
		new tag_trait(	h5,			
								"h5",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h5]->remove_attributes(attribs, 1);
}

/*************************************  h6  ***********************************/
inline void tag_trait_manager::create_h6()
{
	tag_trait_vec.push_back(
		new tag_trait(	h6,			
								"h6",			
								block,		
								in_line,		
								populate_attribs(h_attributes, 18),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[h6]->remove_attributes(attribs, 1);
}

/*************************************  head  *********************************/
inline void tag_trait_manager::create_head()
{
	const xhtml_strict head_nested_tags[] = {title, script, style, base, meta, link};

	tag_trait_vec.push_back(
		new tag_trait(	head,			
								"head",			
								non_flow,	
								non_flow,		
								populate_attribs(head_attributes, 5),		
								populate_nested_tags(head_nested_tags, 6),
								std::set<xhtml_strict>()));

}

/*************************************  hr  ***********************************/
inline void tag_trait_manager::create_hr()
{
	tag_trait_vec.push_back(
		new tag_trait(	hr,			
								"hr",			
								block,		
								empty,			
								populate_attribs(hr_attributes, 21),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align, noshade, size, width };
	tag_trait_vec[hr]->remove_attributes(attribs, 4);
}

/*************************************  html  *********************************/
inline void tag_trait_manager::create_html()
{
	const xhtml_strict html_nested_tags[] = {head, body};

	tag_trait_vec.push_back(
		new tag_trait(	html,			
						"html",			
						non_flow,	
						non_flow,		
						populate_attribs(html_attributes, 4),		
						populate_nested_tags(html_nested_tags, 3),			
						std::set<xhtml_strict>()));

}

/*************************************  i  ************************************/
inline void tag_trait_manager::create_i()
{
	tag_trait_vec.push_back(
		new tag_trait(	i,			
								"i",			
								in_line,	
								in_line,		
								populate_attribs(i_attributes, 17),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  iframe  *******************************/
inline void tag_trait_manager::create_iframe()
{
	// iframe not available for strict tag_type
}

/*************************************  img  **********************************/
inline void tag_trait_manager::create_img()
{
	tag_trait_vec.push_back(
		new tag_trait(	img,			
								"img",			
								in_line,	
								empty,			
								populate_attribs(img_attributes, 29),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { border, hspace, name, vspace };
	tag_trait_vec[img]->remove_attributes(attribs, 4);
}

/*************************************  input  ********************************/
inline void tag_trait_manager::create_input()
{
	tag_trait_vec.push_back(
		new tag_trait(	input,		
								"input",		
								in_line,	
								flow,			
								populate_attribs(input_attributes, 37),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  ins  **********************************/
inline void tag_trait_manager::create_ins()
{
	tag_trait_vec.push_back(
		new tag_trait(	ins,
								"ins",
								non_flow,
								flow, 
								populate_attribs(ins_attributes, 19),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

}

/*************************************  isindex  ******************************/
inline void tag_trait_manager::create_isindex()
{
	// isindex not available for strict tag_type
}

/*************************************  kbd  **********************************/
inline void tag_trait_manager::create_kbd()
{
	tag_trait_vec.push_back(
		new tag_trait(	kbd,			
								"kbd",			
								in_line,	
								in_line,		
								populate_attribs(kbd_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  label  ********************************/
inline void tag_trait_manager::create_label()
{
	const xhtml_strict label_nested_exceptions[] = {label};

	tag_trait_vec.push_back(
		new tag_trait(	label,		
								"label",		
								in_line,	
								in_line,		
								populate_attribs(label_attributes, 21),		
								std::set<xhtml_strict>(),						
								populate_nested_tags(label_nested_exceptions, 1)));
}

/*************************************  legend  *******************************/
inline void tag_trait_manager::create_legend()
{
	tag_trait_vec.push_back(
		new tag_trait(	legend,		
						"legend",		
						non_flow,	
						in_line,		
						populate_attribs(legend_attributes, 19),	
						std::set<xhtml_strict>(),						
						std::set<xhtml_strict>()));

}

/*************************************  li  ***********************************/
inline void tag_trait_manager::create_li()
{
	tag_trait_vec.push_back(
		new tag_trait(	li,			
						"li",			
						non_flow,	
						flow,			
						populate_attribs(li_attributes, 19),		
						std::set<xhtml_strict>(),						
						std::set<xhtml_strict>()));

	const attribute attribs[] = { type, value };
	tag_trait_vec[li]->remove_attributes(attribs, 2);
}

/*************************************  link  *********************************/
inline void tag_trait_manager::create_link()
{
	tag_trait_vec.push_back(
		new tag_trait(	link,			
								"link",			
								non_flow,	
								empty,			
								populate_attribs(link_attributes, 25),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { target };
	tag_trait_vec[link]->remove_attributes(attribs, 1);
}

/*************************************  map  **********************************/
inline void tag_trait_manager::create_map()
{
	const xhtml_strict map_nested_tags[] = {area};

	tag_trait_vec.push_back(
		new tag_trait(	map,			
								"map",			
								in_line,	
								block,			
								populate_attribs(map_attributes, 18),			
								populate_nested_tags(map_nested_tags,	1),		
								std::set<xhtml_strict>()));

}

/*************************************  menu  *********************************/
inline void tag_trait_manager::create_menu()
{
	// menu not allowed for strict doctypes
}

/*************************************  meta  *********************************/
inline void tag_trait_manager::create_meta()
{
	tag_trait_vec.push_back(
		new tag_trait(	meta,			
								"meta",			
								non_flow,	
								empty,			
								populate_attribs(meta_attributes, 7),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  noframes  *****************************/
inline void tag_trait_manager::create_noframes()
{
	// noframes not available for strict tag_type
}

/*************************************  noscript  *****************************/
inline void tag_trait_manager::create_noscript()
{
	tag_trait_vec.push_back(
		new tag_trait(	noscript,		
								"noscript",		
								block,		
								flow,			
								populate_attribs(noscript_attributes, 17),
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  object  *******************************/
inline void tag_trait_manager::create_object()
{
	const xhtml_strict object_nested_tag[] = {param};

	tag_trait_vec.push_back(
		new tag_trait(	object,		
								"object",		
								in_line,	
								in_line,			
								populate_attribs(object_attributes, 34),		
								populate_nested_tags(object_nested_tag,	1),
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align, border, hspace, vspace };
	tag_trait_vec[object]->remove_attributes(attribs, 4);
}

/*************************************  ol  ***********************************/
inline void tag_trait_manager::create_ol()
{
	const xhtml_strict ol_nested_tags[] = {li};

	tag_trait_vec.push_back(
		new tag_trait(	ol,			
								"ol",			
								block,		
								non_flow,		
								populate_attribs(ol_attributes, 20),			
								populate_nested_tags(ol_nested_tags, 1),			
								std::set<xhtml_strict>()));

	const attribute attribs[] = { compact, start, type };
	tag_trait_vec[ol]->remove_attributes(attribs, 3);

}

/*************************************  optgroup  *****************************/
inline void tag_trait_manager::create_optgroup()
{
	const xhtml_strict optgroup_nested_tags[] = {option};

	tag_trait_vec.push_back(
		new tag_trait(	optgroup,		
						"optgroup",		
						non_flow,	
						non_flow,		
						populate_attribs(optgroup_attributes, 21),	
						populate_nested_tags(optgroup_nested_tags, 1),		
						std::set<xhtml_strict>()));

}

/*************************************  option  *******************************/
inline void tag_trait_manager::create_option()
{
	tag_trait_vec.push_back(
		new tag_trait(	option,		
								"option",		
								non_flow,	
								cdata,
//							non_flow,		
								populate_attribs(option_attributes, 21),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  p  ************************************/
inline void tag_trait_manager::create_p()
{
	tag_trait_vec.push_back(
		new tag_trait(	p,			
								"p",			
								block,		
								in_line,		
								populate_attribs(p_attributes, 18),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align };
	tag_trait_vec[p]->remove_attributes(attribs, 1);

}

/*************************************  param  ********************************/
inline void tag_trait_manager::create_param()
{
	tag_trait_vec.push_back(
		new tag_trait(	param,
								"param",
								non_flow,
								empty,
								populate_attribs(param_attributes, 5),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

}

/*************************************  pre  **********************************/
inline void tag_trait_manager::create_pre()
{
	const xhtml_strict pre_nested_exceptions[] = {img, object,  big, small, 
											sub, sup };



	tag_trait_vec.push_back(
		new tag_trait(	pre,			
						"pre",			
						block,		
						in_line,		
						populate_attribs(pre_attributes, 19),			
						std::set<xhtml_strict>(),						
						populate_nested_tags(pre_nested_exceptions, 6)));

	const attribute attribs[] = { width };
	tag_trait_vec[pre]->remove_attributes(attribs, 1);
}

/*************************************  q  ************************************/
inline void tag_trait_manager::create_q()
{
	tag_trait_vec.push_back(
		new tag_trait(	q,			
								"q",			
								in_line,	
								in_line,		
								populate_attribs(q_attributes, 18),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  s  ************************************/
inline void tag_trait_manager::create_s()
{
	// s not available in strict tag_type
}

/*************************************  samp  *********************************/
inline void tag_trait_manager::create_samp()
{
	tag_trait_vec.push_back(
		new tag_trait(	samp,			
								"samp",			
								in_line,	
								in_line,		
								populate_attribs(samp_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));


}

/*************************************  script  *******************************/

inline void tag_trait_manager::create_script()
{
	tag_trait_vec.push_back(
		new tag_trait(	script,		
								"script",		
								in_line,	
								cdata,		
								populate_attribs(script_attributes, 6),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { language };
	tag_trait_vec[script]->remove_attributes(attribs, 1);
}

/*************************************  select  *******************************/
inline void tag_trait_manager::create_select()
{
	const xhtml_strict select_nested_tags[] = {optgroup, option};

	tag_trait_vec.push_back(
		new tag_trait(	select,		
								"select",		
								in_line,	
								non_flow,		
								populate_attribs(select_attributes, 28),		
								populate_nested_tags(select_nested_tags, 2),			
								std::set<xhtml_strict>()));
}

/*************************************  small  ********************************/

inline void tag_trait_manager::create_small()
{
	tag_trait_vec.push_back(
		new tag_trait(	small,		
								"small",		
								in_line,	
								in_line,		
								populate_attribs(small_attrubutes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  span  *********************************/

inline void tag_trait_manager::create_span()
{
	tag_trait_vec.push_back(
		new tag_trait(	span,			
								"span",			
								in_line,	
								in_line,		
								populate_attribs(span_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  strike  *******************************/

inline void tag_trait_manager::create_strike()
{
	// strike not available in strict tag_type
}

/*************************************  strong  *******************************/
inline void tag_trait_manager::create_strong()
{
	tag_trait_vec.push_back(
		new tag_trait(	strong,		
								"strong",		
								in_line,	
								in_line,		
								populate_attribs(strong_attributes, 17),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  style  ********************************/
inline void tag_trait_manager::create_style()
{
	tag_trait_vec.push_back(
		new tag_trait(	style,		
								"style",		
								non_flow,	
								cdata,			
								populate_attribs(style_attributes, 7),		
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  sub  **********************************/
inline void tag_trait_manager::create_sub()
{
	tag_trait_vec.push_back(
		new tag_trait(	sub,			
								"sub",			
								in_line,	
								in_line,		
								populate_attribs(sub_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  sup  **********************************/
inline void tag_trait_manager::create_sup()
{
	tag_trait_vec.push_back(
		new tag_trait(	sup,			
								"sup",			
								in_line,	
								in_line,		
								populate_attribs(sup_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));
}

/*************************************  table  ********************************/
inline void tag_trait_manager::create_table()
{
	const xhtml_strict table_nested_tags[] = {caption, colgroup, col, thead, tbody, 
										tfoot, tr };
	tag_trait_vec.push_back(
		new tag_trait(	table, 
								"table",
								block,
								non_flow,
								populate_attribs(table_attributes, 26),
								populate_nested_tags(table_nested_tags, 7),
								std::set<xhtml_strict>()));

	const attribute attribs[] = { align, bgcolor };
	tag_trait_vec[table]->remove_attributes(attribs, 2);

}

/*************************************  tbody  ********************************/
inline void tag_trait_manager::create_tbody()
{
	const xhtml_strict tbody_element_nested_tags[] = {tr};

	tag_trait_vec.push_back(
		new tag_trait(	tbody,
								"tbody",
								non_flow,
								non_flow,
								populate_attribs(tbody_attributes, 21),
								populate_nested_tags(tbody_element_nested_tags, 1),
								std::set<xhtml_strict>()));
}

/*************************************  td  ***********************************/
inline void tag_trait_manager::create_td()
{
	tag_trait_vec.push_back(
		new tag_trait(	td,
								"td",
								non_flow,
								flow,
								populate_attribs(td_attributes, 31),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

	const attribute attribs[] = { bgcolor, height, nowrap, width };
	tag_trait_vec[td]->remove_attributes(attribs, 4);
}

/*************************************  textarea  *****************************/
inline void tag_trait_manager::create_textarea()
{
	tag_trait_vec.push_back(
		new tag_trait(	textarea,		
						"textarea",		
						in_line,	
						non_flow,		
						populate_attribs(textarea_attributes, 28),	
						std::set<xhtml_strict>(),						
						std::set<xhtml_strict>()));

}

/*************************************  tfoot  ********************************/
inline void tag_trait_manager::create_tfoot()
{
	const xhtml_strict tfoot_element_nested_tags[] = {tr};

	tag_trait_vec.push_back(
		new tag_trait(	tfoot,
								"tfoot",
								non_flow,
								non_flow,
								populate_attribs(tfoot_attributes, 21),
								populate_nested_tags(tfoot_element_nested_tags, 1),
								std::set<xhtml_strict>()));
}

/*************************************  th  ***********************************/
inline void tag_trait_manager::create_th()
{
	tag_trait_vec.push_back(
		new tag_trait(	th,
								"th",
								non_flow,
								flow,
								populate_attribs(th_attributes, 31),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

	const attribute attribs[] = { bgcolor, height, nowrap, width };
	tag_trait_vec[th]->remove_attributes(attribs, 4);

}

/*************************************  thead  ********************************/
inline void tag_trait_manager::create_thead()
{
	const xhtml_strict thead_element_nested_tags[] = {tr};

	tag_trait_vec.push_back(
		new tag_trait(	thead,
								"thead",
								non_flow,
								non_flow,
								populate_attribs(thead_attributes, 21),
								populate_nested_tags(thead_element_nested_tags, 1),
								std::set<xhtml_strict>()));

}

/*************************************  title  ********************************/
inline void tag_trait_manager::create_title()
{
	tag_trait_vec.push_back(
		new tag_trait(	title,
								"title",
								non_flow,
								cdata,
								populate_attribs(title_attributes, 4),
								std::set<xhtml_strict>(),
								std::set<xhtml_strict>()));

}

/*************************************  tr  ***********************************/
inline void tag_trait_manager::create_tr()
{
	const xhtml_strict tr_nested_tags[] = {th, td};

	tag_trait_vec.push_back(
		new tag_trait(	tr,
								"tr",
								non_flow,
								non_flow,
								populate_attribs(tr_attributes, 22),
								populate_nested_tags(tr_nested_tags, 2),
								std::set<xhtml_strict>()));

	const attribute attribs[] = { bgcolor };
	tag_trait_vec[tr]->remove_attributes(attribs, 1);

}

/*************************************  tt  ***********************************/
inline void tag_trait_manager::create_tt()
{
	tag_trait_vec.push_back(
		new tag_trait(	tt,			
								"tt",			
								in_line,	
								in_line,		
								populate_attribs(tt_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

/*************************************  u  ************************************/
inline void tag_trait_manager::create_u()
{
	// u not available in strict tag_type
}

/*************************************  ul  ***********************************/
inline void tag_trait_manager::create_ul()
{
	const xhtml_strict ul_nested_tags[] = {li};

	tag_trait_vec.push_back(
		new tag_trait(	ul,			
								"ul",			
								block,		
								non_flow,		
								populate_attribs(ul_attributes, 19),			
								populate_nested_tags(ul_nested_tags, 1),						
								std::set<xhtml_strict>()));

	const attribute attribs[] = { compact, type };
	tag_trait_vec[ul]->remove_attributes(attribs, 2);
}

/*************************************  var  *****************************/

inline void tag_trait_manager::create_var()
{
	tag_trait_vec.push_back(
		new tag_trait(	var,			
								"var",			
								in_line,	
								in_line,		
								populate_attribs(var_attributes, 17),			
								std::set<xhtml_strict>(),						
								std::set<xhtml_strict>()));

}

}

